//
//  orderTotalCell.m
//  KuWoCan
//
//  Created by hwd on 17/3/14.
//  Copyright © 2017年 hwd. All rights reserved.
//

#import "orderTotalCell.h"

/************************************************************************/

/**************************总计小单元格***********************************/

/************************************************************************/


@implementation orderTotalCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        UIView *topLineView = [UIView new];
        topLineView.backgroundColor = KwColor(@"#eeeeee");
        [self addSubview:topLineView];
        [topLineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.and.top.and.right.equalTo(self);
            make.height.equalTo(@1);
        }];
        [self setUpUI];
    }
    return self;
}

- (void)setUpUI
{
    //parameter:合记
    _oTotalParaLab = [UILabel new];
    _oTotalParaLab.textColor = [UIColor blackColor];
    _oTotalParaLab.font = [UIFont systemFontOfSize:14.0];
    _oTotalParaLab.textAlignment = NSTextAlignmentLeft;
    _oTotalParaLab.text = @"￥3000.00";
    [self addSubview:_oTotalParaLab];
    [_oTotalParaLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(@-15);
        make.height.equalTo(@14);
        make.top.equalTo(@14);
        make.bottom.equalTo(@-14);
    }];
    
    UILabel *oTotalConstLab = [UILabel new];
    oTotalConstLab.textColor = [UIColor blackColor];
    oTotalConstLab.font = [UIFont systemFontOfSize:14.0];
    oTotalConstLab.textAlignment = NSTextAlignmentLeft;
    oTotalConstLab.text = @"合计:";
    [self addSubview:oTotalConstLab];
    [oTotalConstLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(_oTotalParaLab.mas_left).offset(-10);
        make.height.equalTo(@14);
        make.top.equalTo(_oTotalParaLab.mas_top);
    }];
    
    //parameter:共多少见
    _oNumberLab = [UILabel new];
    _oNumberLab.textColor = [UIColor blackColor];
    _oNumberLab.font = [UIFont systemFontOfSize:14.0];
    _oNumberLab.textAlignment = NSTextAlignmentLeft;
    _oNumberLab.text = @"共50件商品";
    [self addSubview:_oNumberLab];
    [_oNumberLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(oTotalConstLab.mas_left).offset(-15);
        make.height.equalTo(@14);
        make.top.equalTo(_oTotalParaLab.mas_top);
    }];
    
}



@end
